package Rozetka.test;

import Rozetka.Pages.HomePage;
import Rozetka.Pages.RegistrationPage;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

public class AuthorizationNegative extends TestCondition {

    @DataProvider(name = "NegativeRegistration")
    public Object[][] provideData2()
    {
        return new Object[][]         {
                { "Ivanov", "ivanov2asdasd5@mail.ru", "123456aaa" },
        };
    }

    @Test(dataProvider = "NegativeRegistration")
    public void negativeUserRegistration(String Name, String Email, String Password){
        HomePage home = new HomePage(driver);
        home.open();
        RegistrationPage registr = home.openRegistrationPage();
        registr.registrNewUser(Name, Email, Password);
        Assert.assertTrue(registr.registrationError());
    }
}
